<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>元素的显示与隐藏</title>
		
		<style>
			div{
				height: 200px;
				width: 200px;
			}
			
			.btn1:hover+.box1{
		/*   元素消失方案一   */
				display: none;
			}
			.box1{
				background-color: red;
				display: block;
			}
/* --------------------------------------------			 */
		/*  元素消失方案二   */
			.box2{
				background-color: green;
				visibility: visible;
			}
			.btn2:hover+.box2{
				visibility: hidden;
			}
			
/* --------------------------------------------			 */
		/*  元素消失方案三   */	
			.box3{
				background-color: blue;
			}
			.btn3:hover+.box3{
				opacity: 0;
			}
			
		</style>

	</head>
	<body>
		<button class="btn1"> 移入按钮让box1消失 </button>
		<div class="box1">1</div>
			
		<button class="btn2"> 移入按钮让box2消失 </button>
		<div class="box2">2</div>
		
		<button class="btn3"> 移入按钮让box3消失 </button>
		<div class="box3">3</div>
		
		<p>123132</p>
		
		
	</body>
</html>